import { createRouter, createWebHistory } from 'vue-router'
import StaffPage from '@/modules/auth/StaffPage.vue'
import CustomerManagement from '@/modules/customer/CustomerManagement.vue'
import CustomerInfoTemplate from '@/modules/customer/CustomerInfoTemplate.vue'
import PhoneNumberInfoTemplate from '@/modules/customer/PhoneNumberInfoTemplate.vue'
import VirtualNumberInfoTemplate from '@/modules/customer/VirtualNumberInfoTemplate.vue'
import AccountInfoTemplate from '@/modules/customer/AccountInfoTemplate.vue'
import CreateCustomer from '@/modules/customer/CreateCustomer.vue'
import CreateAccount from '@/modules/customer/CreateAccount.vue'
import UserManagement from '@/modules/staff/UserManagement.vue'
import StaffInfoTemplate from '@/modules/staff/StaffInfoTemplate.vue'
import RoleInfoTemplate from '@/modules/staff/RoleInfoTemplate.vue'
import PermissionInfoTemplate from '@/modules/staff/PermissionInfoTemplate.vue'
import BillQuery from '@/modules/bill/BillQuery.vue'
import BillInfoTemplate from '@/modules/bill/BillInfoTemplate.vue'
import MonthlyBill from '@/modules/bill/MonthlyBill.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/staff'
    },
    {
      path: '/staff',
      component: StaffPage
    },
    // 客户管理路由
    {
      path: '/customer',
      component: CustomerManagement
    },
    {
      path: '/customer/info',
      component: CustomerInfoTemplate
    },
    {
      path: '/customer/create',
      component: CreateCustomer
    },
    {
      path: '/customer/phone',
      component: PhoneNumberInfoTemplate
    },
    {
      path: '/customer/virtual',
      component: VirtualNumberInfoTemplate
    },
    {
      path: '/customer/account',
      component: AccountInfoTemplate
    },
    {
      path: '/customer/account/create',
      component: CreateAccount
    },
    // 员工管理路由
    {
      path: '/staff/manage',
      component: UserManagement
    },
    {
      path: '/staff/info',
      component: StaffInfoTemplate
    },
    {
      path: '/staff/role',
      component: RoleInfoTemplate
    },
    {
      path: '/staff/permission',
      component: PermissionInfoTemplate
    },
    // 账单管理路由
    {
      path: '/bill',
      component: BillQuery
    },
    {
      path: '/bill/info',
      component: BillInfoTemplate
    },
    {
      path: '/bill/monthly',
      component: MonthlyBill
    }
  ]
})

export default router